home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / softwareupdate / system / amigados / advancedroutines / examples.doc < prev    next >
Text File  |  1996-10-10  |  3KB  |  80 lines

  1. 7  ADVANCED AMIGADOS ROUTINES - EXAMPLES
  2.  
  3. Example 1
  4.   This example demonstrates how to use the Examine() function.
  5.   The program needs a file, directory or volume name as the
  6.   only argument and it will print some interesting information
  7.   about given the object.
  8.  
  9.   This example can be used with all versions of the dos
  10.   library.
  11.  
  12. Example 2
  13.   This example does exactly the same thing as the previous one,
  14.   it simply demonstrates how to use the Examine() function.
  15.   However, this example uses the new AllocDosObject() and
  16.   FreeDosObject() functions which were introduced in Release 2.
  17.   You should use these new functions (if possible) instead of
  18.   using the older method of allocating a fixed amount of memory
  19.   for the dos object (the FileInfoBlock structure).
  20.  
  21.   This example can only be used with dos library V37 or higher.
  22.  
  23. Example 3
  24.   This example demonstrates how to examine all objects in
  25.   directory or volume. The program needs a directory or
  26.   volume name as the only argument and it will then list
  27.   all files and directories (subdirectories) in that
  28.   directory or volume. This is a good example on how to
  29.   use the Examine() and ExNext() functions.
  30.  
  31.   This example can be used with all versions of the dos
  32.   library.
  33.  
  34. Example 4
  35.   This program will examina all objects in a directory/device.
  36.   The files will be listed, and if finds a directory it will
  37.   with help of a recursive function examine all objects in
  38.   that directory also and so on... Good example on how to use
  39.   the Examine() and ExNext() functions in a recursive program.
  40.  
  41.   This example can be used with all versions of the dos
  42.   library.
  43.  
  44. Example 5
  45.   This example demonstrates how to use the Info() function
  46.   to get some information about a disk. We will, among many
  47.   things, check if the disk is write protected or not, what
  48.   type of disk it is etc... In this example we examine the
  49.   disk in "df0:".
  50.  
  51.   This example can be used with all versions of the dos
  52.   library.
  53.  
  54. Example 6
  55.   This example will examine some of the "lowest" parts in
  56.   AmigaDOS. It will look up and print all Assigns, Volumes
  57.   and Devices AmigaDOS knows about. Please note that we
  58.   will dig fairly deep down into the system, and only
  59.   experienced programmers are recommended to do this. I
  60.   have added a lot of comments to help you, and if you cut
  61.   out parts of this example carefully you should be able
  62.   to use it in your own programs.
  63.  
  64.   This example can be used with all versions of the dos
  65.   library.
  66.  
  67. Example 7
  68.   This example will as the previous one examine the special
  69.   lists of available Assigns, Volumes and Devices. This
  70.   example will however add the volume name to the device
  71.   in which the volume is. We will also only print the
  72.   devices (with their volume name) which are currently
  73.   available to access. We will for example not print the
  74.   device "df0:" if there is not a disk in that drive.
  75.   However, if there is a disk in the drive we will both
  76.   print the device name and the name of the volume which is
  77.   in that device. We will therefore get a list which is
  78.   identical to the one used by the ASL file requeter.
  79.  
  80.